package cn.wolfcode.wolf2w.note.query;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
@ToString
public class NoteCondition {
    public static final Map<Integer,NoteCondition> MAP_DAY = new HashMap<>();
    public static final Map<Integer,NoteCondition> MAP_TIME = new HashMap<>();
    public static final Map<Integer,NoteCondition> MAP_CONSUME = new HashMap<>();

    static {
        MAP_DAY.put(1,new NoteCondition(0,3));
        MAP_DAY.put(2,new NoteCondition(4,7));
        MAP_DAY.put(3,new NoteCondition(8,14));
        MAP_DAY.put(4,new NoteCondition(15,Integer.MAX_VALUE));

        MAP_TIME.put(1,new NoteCondition(1,2));
        MAP_TIME.put(2,new NoteCondition(3,4));
        MAP_TIME.put(3,new NoteCondition(5,6));
        MAP_TIME.put(4,new NoteCondition(7,8));
        MAP_TIME.put(5,new NoteCondition(9,10));
        MAP_TIME.put(6,new NoteCondition(11,12));

        MAP_CONSUME.put(1,new NoteCondition(1,999));
        MAP_CONSUME.put(2,new NoteCondition(1000,6000));
        MAP_CONSUME.put(3,new NoteCondition(6001,20000));
        MAP_CONSUME.put(4,new NoteCondition(20001,Integer.MAX_VALUE));
    }

    private int min;
    private int max;

    public NoteCondition(int min, int max) {
        this.min = min;
        this.max = max;
    }
}
